
//mongo.exe  -u root -p 123456 localhost:27017/admin E:\workspace\waterblabla\server\src\waterblabla\app\initMongo.js

db = db.getSiblingDB('provider');
db.createCollection("provider", { size: 2147483648 } );
db.provider.dropIndexes();


db = db.getSiblingDB('station');
db.createCollection("station", { size: 2147483648 } );
db.station.dropIndexes();
db.station.createIndex( { qid: 1 },{name:"idx1",background:true} );

db = db.getSiblingDB('contract');
db.createCollection("contract", { size: 2147483648 } );
db.contract.dropIndexes();
db.contract.createIndex( { "station.qid": 1 },{name:"idx1",background:true} );

db = db.getSiblingDB('order');
db.createCollection("order", { size: 2147483648 } );
db.order.dropIndexes();
db.order.createIndex( { state:1, "station.qid":1, created:1, "sn":1 },{name:"idx1",background:true} );

db = db.getSiblingDB('device');
db.createCollection("device", { size: 2147483648 } );
db.device.dropIndexes();

